<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
    <style>
      * {
        margin: 0;
        padding: 0;
      }

      .bg-title {
        text-align: center;
        color: #333;
        font-size: 20px;
        font-weight: 600;
        margin-top: 20px;
      }

      .box {
        width: 300px;
        height: 300px;
        line-height: 300px;
        border-radius: 5px;
        border: 1px solid #ccc;
        cursor: pointer;
        user-select: none;
        font-size: 20px;
        transition: all 0.2s ease-in-out;
        position: relative;
        overflow: hidden;
        margin: 200px auto 0;
        text-align: center;
      }
      .box:hover {
        color: #7996e6;
        border-color: #7996e6;
      }

      .el-tooltip__popper {
        position: absolute;
        border-radius: 4px;
        padding: 10px;
        z-index: 2000;
        font-size: 12px;
        line-height: 1.2;
        min-width: 10px;
        word-wrap: break-word;
      }
      .el-tooltip__popper .popper__arrow,
      .el-tooltip__popper .popper__arrow::after {
        position: absolute;
        display: block;
        width: 0;
        height: 0;
        border-color: transparent;
        border-style: solid;
      }
      .el-tooltip__popper .popper__arrow {
        border-width: 6px;
      }
      .el-tooltip__popper .popper__arrow::after {
        content: ' ';
        border-width: 5px;
      }
      .el-tooltip__popper[x-placement^='top'] {
        margin-bottom: 12px;
      }
      .el-tooltip__popper[x-placement^='top'] .popper__arrow {
        bottom: -6px;
        border-top-color: #303133;
        border-bottom-width: 0;
      }
      .el-tooltip__popper[x-placement^='top'] .popper__arrow::after {
        bottom: 1px;
        margin-left: -5px;
        border-top-color: #303133;
        border-bottom-width: 0;
      }
      .el-tooltip__popper.is-dark {
        background: #303133;
        color: #fff;
      }
    </style>
  </head>
  <body>
    <div class="box">
      <span>Reference Element</span>
    </div>

    <div class="el-tooltip__popper is-dark" x-placement="top">
      <p>Hello PopperJS</p>
      <div x-arrow class="popper__arrow"></div>
    </div>

    <script src="./popper.js"></script>
    <script>
      var box = document.querySelector('.box'),
        popper = document.querySelector('.el-tooltip__popper'),
        pIntance = new Popper(box, popper, {
          placement: 'top'
        });
    </script>
  </body>
</html>
